﻿<UserControl
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:d="http://schemas.microsoft.com/expression/blend/2006"
   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
   xmlns:Microsoft.FamilyShowLib="clr-namespace:Microsoft.FamilyShowLib;assembly=FamilyShowLib"
   xmlns:local="clr-namespace:Microsoft.FamilyShow"
   xmlns:sys="clr-namespace:System;assembly=mscorlib"
   x:Class="Microsoft.FamilyShow.Details" DataContextChanged="UserControl_DataContextChanged">
  <UserControl.Resources>
    <ResourceDictionary>

      <!-- Converter for formatting dates to short date format -->
      <local:DateFormattingConverter x:Key="DateFormattingConverter"/>

      <!-- Converter for displaying the the first name with an apostrophe. -->
      <local:FirstNamePossessiveFormConverter x:Key="FirstNamePossessiveFormConverter"/>

      <!-- Converter for showing/hiding features based on boolean property -->
      <local:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>

      <!-- Converter for disabling the death related textboxes -->
      <local:NotConverter x:Key="NotConverter"/>

      <!-- Converter for showing/hiding the parents, spouses, and avatar section -->
      <local:ComposingConverter x:Key="ComposingConverter">
        <local:ComposingConverter.Converters>
          <local:NotConverter/>
          <local:BoolToVisibilityConverter/>
        </local:ComposingConverter.Converters>
      </local:ComposingConverter>

      <local:ImageConverter x:Key="ImageConverter"/>

      <!-- Data provider for binding to the relationship types enum values -->
      <ObjectDataProvider x:Key="RelationshipValuesEnumDS" ObjectType="{x:Type sys:Enum}" MethodName="GetValues">
        <ObjectDataProvider.MethodParameters>
          <x:Type TypeName="local:FamilyMemberComboBoxValue" />
        </ObjectDataProvider.MethodParameters>
      </ObjectDataProvider>

      <!-- Data provider for binding to the spouse modifier enum values -->
      <ObjectDataProvider x:Key="SpouseStatusEnumDS" ObjectType="{x:Type sys:Enum}" MethodName="GetValues">
        <ObjectDataProvider.MethodParameters>
          <x:Type TypeName="Microsoft.FamilyShowLib:SpouseModifier" />
        </ObjectDataProvider.MethodParameters>
      </ObjectDataProvider>

      <!-- Data provider for binding to the gender types enum values -->
      <ObjectDataProvider x:Key="GenderEnumDS" ObjectType="{x:Type sys:Enum}" MethodName="GetValues">
        <ObjectDataProvider.MethodParameters>
          <x:Type TypeName="Microsoft.FamilyShowLib:Gender" />
        </ObjectDataProvider.MethodParameters>
      </ObjectDataProvider>

      <!-- Data Template for displaying the parent set -->
      <DataTemplate x:Key="ParentSetTemplate">
        <TextBlock Text="{Binding Path=Name, Mode=Default}"/>
      </DataTemplate>

      <!-- Animation for expanding the Details Add section -->
      <Storyboard x:Key="ExpandDetailsAdd" Completed="ExpandDetailsAdd_StoryboardCompleted">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsAdd" Storyboard.TargetProperty="(FrameworkElement.Height)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="300"/>
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsAdd" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
          <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Visible}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsInfo" Storyboard.TargetProperty="(FrameworkElement.Height)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="300"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="225"/>
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEdit" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsInfo" Storyboard.TargetProperty="(UIElement.Opacity)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.2"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsList" Storyboard.TargetProperty="(UIElement.Opacity)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.2"/>
        </DoubleAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="EditButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False"/>
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FamilyMemberAddButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False"/>
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="AddButton" Storyboard.TargetProperty="(Button.IsDefault)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00.3000000" Value="True"/>
        </BooleanAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEditRelationship" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="EditRelationshipsButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False"/>
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InfoButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False"/>
        </BooleanAnimationUsingKeyFrames>
      </Storyboard>

      <!-- Animation for collapsing the Details Add section -->
      <Storyboard x:Key="CollapseDetailsAdd" Completed="CollapseDetailsAdd_StoryboardCompleted">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="DetailsAdd">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="300"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsAdd" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
          <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="DetailsInfo">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="225"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="300"/>
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEdit" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsInfo" Storyboard.TargetProperty="(UIElement.Opacity)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DetailsList">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="EditButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True"/>
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FamilyMemberAddButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True"/>
        </BooleanAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEditRelationship" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InfoButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True"/>
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="EditRelationshipsButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True"/>
        </BooleanAnimationUsingKeyFrames>
      </Storyboard>

      <!-- Animation for expanding the Details Edit section -->
      <Storyboard x:Key="ExpandDetailsEdit" Completed="ExpandDetailsEdit_StoryboardCompleted">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsEdit" Storyboard.TargetProperty="(FrameworkElement.Height)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="545"/>
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsEdit" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
          <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Visible}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsInfo" Storyboard.TargetProperty="(FrameworkElement.Height)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="300"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsAdd" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsList" Storyboard.TargetProperty="(UIElement.Opacity)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.2"/>
        </DoubleAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="EditButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False"/>
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DoneEditButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00.3000000" Value="True"/>
        </BooleanAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEditRelationship" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsAddIntermediate" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
      </Storyboard>

      <!-- Animation for collapsing the Details Edit section -->
      <Storyboard x:Key="CollapseDetailsEdit" Completed="CollapseDetailsEdit_StoryboardCompleted">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="DetailsEdit">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="545"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="DetailsInfo">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="300"/>
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsAdd" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsList" Storyboard.TargetProperty="(UIElement.Opacity)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="EditButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True"/>
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DoneEditButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False"/>
        </BooleanAnimationUsingKeyFrames>
      </Storyboard>

      <!-- Animation for expanding the Details Edit Relationship section -->
      <Storyboard x:Key="ExpandDetailsEditRelationship" Completed="ExpandDetailsEditRelationship_StoryboardCompleted">
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEdit" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEditRelationship" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
        </ObjectAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsAdd" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsAddIntermediate" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsEditRelationship" Storyboard.TargetProperty="(FrameworkElement.Height)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="300"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsInfo" Storyboard.TargetProperty="(FrameworkElement.Height)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="300"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
      </Storyboard>

      <!-- Animation for collapsing the Details Edit Relationship section -->
      <Storyboard x:Key="CollapseDetailsEditRelationship" Completed="CollapseDetailsEditRelationship_StoryboardCompleted">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsEditRelationship" Storyboard.TargetProperty="(FrameworkElement.Height)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="300"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEdit" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsAdd" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsAddIntermediate" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="DetailsInfo">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="300"/>
        </DoubleAnimationUsingKeyFrames>
      </Storyboard>

      <!-- Animation for expanding the Details Add Intermediate section -->
      <Storyboard x:Key="ExpandDetailsAddIntermediate" Completed="ExpandDetailsAddIntermediate_StoryboardCompleted">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsInfo" Storyboard.TargetProperty="(FrameworkElement.Height)" Duration="00:00:00.0010000">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="225"/>
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEdit" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsInfo" Storyboard.TargetProperty="(UIElement.Opacity)" Duration="00:00:00.0010000">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsList" Storyboard.TargetProperty="(UIElement.Opacity)" Duration="00:00:00.0010000">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
        </DoubleAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="EditButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False"/>
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FamilyMemberAddButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False"/>
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="AddButton" Storyboard.TargetProperty="(Button.IsDefault)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00.3000000" Value="True"/>
        </BooleanAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEditRelationship" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsAddIntermediate" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsAddIntermediate" Storyboard.TargetProperty="(FrameworkElement.Height)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="200"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsAdd" Storyboard.TargetProperty="(FrameworkElement.Height)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="300"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="EditRelationshipsButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False"/>
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InfoButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False"/>
        </BooleanAnimationUsingKeyFrames>
      </Storyboard>

      <!-- Animation for collapsing the Details Add Intermediate section -->
      <Storyboard x:Key="CollapseDetailsAddIntermediate" Completed="CollapseDetailsAddIntermediate_StoryboardCompleted">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="DetailsInfo">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="225"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="300"/>
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEdit" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsInfo" Storyboard.TargetProperty="(UIElement.Opacity)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DetailsList">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="EditButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True"/>
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FamilyMemberAddButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True"/>
        </BooleanAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEditRelationship" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsAddIntermediate" Storyboard.TargetProperty="(FrameworkElement.Height)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="200"/>
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="EditRelationshipsButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True"/>
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InfoButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True"/>
        </BooleanAnimationUsingKeyFrames>
      </Storyboard>

      <ControlTemplate x:Key="LabelControlTemplate" TargetType="{x:Type Label}">
        <Border SnapsToDevicePixels="True" Margin="0,0,0,3" Background="{TemplateBinding Background}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1" Padding="{TemplateBinding Padding}">
          <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" RecognizesAccessKey="True"/>
        </Border>
        <ControlTemplate.Triggers>
          <Trigger Property="IsEnabled" Value="False">
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
          </Trigger>
        </ControlTemplate.Triggers>
      </ControlTemplate>
      
      <Storyboard x:Key="NoPhoto_MouseEnter">
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DragPhotoTextBlock" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="NoPhotoRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
        	<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
        </DoubleAnimationUsingKeyFrames>
      </Storyboard>
      <Storyboard x:Key="NoPhoto_MouseLeave">
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DragPhotoTextBlock" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Hidden}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="NoPhotoRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
        	<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
      </Storyboard>

      <Storyboard x:Key="ExpandAddExisting" Completed="ExpandAddExisting_StoryboardCompleted">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="AddExisting" Storyboard.TargetProperty="(FrameworkElement.Height)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0" />
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="545" />
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="AddExisting" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}" />
          <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Visible}" />
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsInfo" Storyboard.TargetProperty="(FrameworkElement.Height)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="300" />
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsAdd" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}" />
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsList" Storyboard.TargetProperty="(UIElement.Opacity)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.2" />
        </DoubleAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="EditButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False" />
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DoneEditButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00.3000000" Value="True" />
        </BooleanAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsEditRelationship" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}" />
        </ObjectAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsAddIntermediate" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}" />
        </ObjectAnimationUsingKeyFrames>
      </Storyboard>

      <Storyboard x:Key="CollapseAddExisting" Completed="CollapseAddExisting_StoryboardCompleted">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="AddExisting">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="545" />
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="DetailsInfo">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0" />
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="300" />
        </DoubleAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DetailsAdd" Storyboard.TargetProperty="(UIElement.Visibility)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}" />
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsList" Storyboard.TargetProperty="(UIElement.Opacity)">
          <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.2" />
          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
        </DoubleAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="EditButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True" />
        </BooleanAnimationUsingKeyFrames>
        <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DoneEditButton" Storyboard.TargetProperty="(UIElement.IsEnabled)">
          <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False" />
        </BooleanAnimationUsingKeyFrames>
      </Storyboard>

      <Microsoft.FamilyShowLib:Person x:Key="person"/>

      <ControlTemplate x:Key="TextBoxErrorTemplate">
        <!-- Visibility binding is used in this instance to hide the error adorner when the adorned element is not visible -->
        <DockPanel Visibility="{Binding Path=AdornedElement.IsVisible, Converter={StaticResource BoolToVisibilityConverter}, ElementName=adornedElementPlaceholder}">
          <!-- Display the error text as tooltip -->
          <Rectangle DockPanel.Dock="Top" HorizontalAlignment="Right" Height="12" Width="12" Margin="0,0,0,5" Fill="{StaticResource ErrorIcon}" ToolTip="{Binding Path=AdornedElement.(Validation.Errors)[0].ErrorContent, ElementName=adornedElementPlaceholder}"/>
          <Border BorderBrush="Red" BorderThickness="1">
            <AdornedElementPlaceholder x:Name="adornedElementPlaceholder" />
          </Border>
        </DockPanel>
      </ControlTemplate>

      <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF" />
      <SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
      <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
      <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
      <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
      
      <!-- This is the default style for all textboxes in this user control -->
      <Style TargetType="{x:Type TextBox}" BasedOn="{x:Null}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="MinWidth" Value="120"/>
        <Setter Property="MinHeight" Value="20"/>
        <Setter Property="AllowDrop" Value="true"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource TextBoxErrorTemplate}"/>
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type TextBoxBase}">
              <Border 
                  x:Name="Border"
                  CornerRadius="2" 
                  Padding="2"
                  Background="{StaticResource WindowBackgroundBrush}"
                  BorderBrush="{StaticResource SolidBorderBrush}"
                  BorderThickness="1" >
                <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
              </Border>
              <ControlTemplate.Triggers>
                <Trigger Property="IsEnabled" Value="False">
                  <Setter TargetName="Border" Property="Background" Value="{DynamicResource InputBackgroundBrush}"/>
                  <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBackgroundBrush}"/>
                  <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>

    	<Style x:Key="DetailsSeparatorStyle" TargetType="{x:Type Separator}">
    		<Setter Property="Background" Value="#FF6573A0"/>
    		<Setter Property="Margin" Value="10,5,10,5"/>
    		<Setter Property="Focusable" Value="false"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Separator}">
    					<Border SnapsToDevicePixels="true" Height="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>

      <DataTemplate x:Key="ExistPersonTemplate">
        <DataTemplate.Resources>
          <Style TargetType="TextBlock">
            <Setter Property="Foreground" Value="#FF1F3066" />
          </Style>
        </DataTemplate.Resources>
        <HeaderedItemsControl Header="{Binding Path=FullName}" Foreground="#FF1F3066" Margin="5,5,5,5" Style="{DynamicResource HeaderedItemsControlStyle}">
          <TextBlock x:Name="BirthDatePanel" Text="{Binding Path=BirthDateAndPlace}" TextWrapping="Wrap" Margin="0,0,0,5" />
          <TextBlock TextWrapping="Wrap" x:Name="ParentsDatePanel" Margin="0,0,0,5">
            <Run local:BindableExtender.BindableText="{Binding Path=ParentRelationshipText}" /><Run Text=" of " /><Run local:BindableExtender.BindableText="{Binding Path=ParentsText}" />
          </TextBlock>
          <TextBlock TextWrapping="Wrap" x:Name="SiblingsDatePanel" Margin="0,0,0,5">
            <Run local:BindableExtender.BindableText="{Binding Path=SiblingRelationshipText}" /><Run Text=" to " /><Run local:BindableExtender.BindableText="{Binding Path=SiblingsText}" />
          </TextBlock>
          <TextBlock TextWrapping="Wrap" x:Name="SpousesDatePanel" Margin="0,0,0,5">
            <Run local:BindableExtender.BindableText="{Binding Path=SpouseRelationshipText}" /><Run Text=" to " /><Run local:BindableExtender.BindableText="{Binding Path=SpousesText}" />
          </TextBlock>
          <TextBlock TextWrapping="Wrap" x:Name="ChildrenDatePanel" Margin="0,0,0,5">
            <Run local:BindableExtender.BindableText="{Binding Path=ChildRelationshipText}" /><Run Text=" to " /><Run local:BindableExtender.BindableText="{Binding Path=ChildrenText}" />
          </TextBlock>
        </HeaderedItemsControl>
        <DataTemplate.Triggers>
          <DataTrigger Binding="{Binding Path=BirthDate}" Value="{x:Null}">
            <Setter TargetName="BirthDatePanel" Property="Visibility" Value="Collapsed" />
          </DataTrigger>
          <DataTrigger Binding="{Binding Path=Parents.Count}" Value="0">
            <Setter TargetName="ParentsDatePanel" Property="Visibility" Value="Collapsed" />
          </DataTrigger>
          <DataTrigger Binding="{Binding Path=Siblings.Count}" Value="0">
            <Setter TargetName="SiblingsDatePanel" Property="Visibility" Value="Collapsed" />
          </DataTrigger>
          <DataTrigger Binding="{Binding Path=Spouses.Count}" Value="0">
            <Setter TargetName="SpousesDatePanel" Property="Visibility" Value="Collapsed" />
          </DataTrigger>
          <DataTrigger Binding="{Binding Path=Children.Count}" Value="0">
            <Setter TargetName="ChildrenDatePanel" Property="Visibility" Value="Collapsed" />
          </DataTrigger>
        </DataTemplate.Triggers>
      </DataTemplate>

      <Style x:Key="HeaderedItemsControlStyle" TargetType="{x:Type HeaderedItemsControl}">
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type HeaderedItemsControl}">
              <StackPanel>
                <Grid>
                  <Rectangle Fill="{TemplateBinding Background}" />
                  <ContentPresenter ContentSource="Header" />
                </Grid>
                <Grid>
                  <Rectangle Stroke="{TemplateBinding BorderBrush}" />
                  <ItemsPresenter Margin="15,0,0,0" />
                </Grid>
              </StackPanel>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>

      <DataTemplate x:Key="FamilyMemberDataTemplate">
        <StackPanel x:Name="panel" RenderTransformOrigin="0.5,0.5">
          <StackPanel.RenderTransform>
            <TransformGroup>
              <ScaleTransform ScaleX="1" ScaleY="1" />
              <SkewTransform AngleX="0" AngleY="0" />
              <RotateTransform Angle="0" />
              <TranslateTransform X="15" Y="0" />
            </TransformGroup>
          </StackPanel.RenderTransform>
          <Separator x:Name="separator" Visibility="Collapsed" />
          <DockPanel>
            <TextBlock x:Name="text" Text="{Binding}" TextWrapping="Wrap" />
            <TextBlock Text="..." TextWrapping="Wrap" />
            </DockPanel>
        </StackPanel>
        <DataTemplate.Triggers>
          <DataTrigger Binding="{Binding}" Value="Existing">
            <Setter Property="Visibility" Value="Visible" TargetName="separator" />
            <Setter Property="Text" Value="Connect Family Member" TargetName="text" />
            <Setter Property="StackPanel.RenderTransform" TargetName="panel">
              <Setter.Value>
                <TransformGroup>
                  <ScaleTransform ScaleX="1" ScaleY="1" />
                  <SkewTransform AngleX="0" AngleY="0" />
                  <RotateTransform Angle="0" />
                  <TranslateTransform X="0" Y="0" />
                </TransformGroup>
              </Setter.Value>
            </Setter>
          </DataTrigger>
        </DataTemplate.Triggers>
      </DataTemplate>

      <DataTemplate x:Key="ExistingFamilyMemberDataTemplate">
        <StackPanel x:Name="panel" Margin="15,0,0,0">
          <TextBlock x:Name="text" Text="{Binding}" TextWrapping="Wrap" />
        </StackPanel>
        <DataTemplate.Triggers>
          <DataTrigger Binding="{Binding}" Value="Existing">
            <Setter Property="Visibility" Value="Collapsed" TargetName="panel" />
          </DataTrigger>
        </DataTemplate.Triggers>
      </DataTemplate>

      <Style x:Key="ExistingPeopleListBoxStyle" TargetType="ListBox">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="MinWidth" Value="120" />
        <Setter Property="MinHeight" Value="95" />
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="ListBox">
              <Border Name="Border" Background="#90FFFFFF" BorderBrush="{StaticResource SolidBorderBrush}" BorderThickness="0,0,0,0" CornerRadius="5,5,5,5">
                <ScrollViewer Margin="0" Focusable="false">
                  <StackPanel Margin="2" IsItemsHost="True" />
                </ScrollViewer>
              </Border>
              <ControlTemplate.Triggers>
                <Trigger Property="IsEnabled" Value="false">
                  <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
                  <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
                </Trigger>
                <Trigger Property="IsGrouping" Value="true">
                  <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>

      <Style x:Key="ExistingPeopleListBoxItemStyle" TargetType="ListBoxItem">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="ListBoxItem">
              <Border Name="Border" Padding="2" SnapsToDevicePixels="true">
                <ContentPresenter />
              </Border>
              <ControlTemplate.Triggers>
                <Trigger Property="IsSelected" Value="true">
                	<Setter Property="Background" TargetName="Border" Value="{DynamicResource FamilyEditListViewSelectedBrush}"/>
                </Trigger>
                <Trigger Property="IsEnabled" Value="false">
                  <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>

    </ResourceDictionary>
  </UserControl.Resources>

  <UserControl.Triggers>
    <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="FamilyMemberAddButton">
      <BeginStoryboard Storyboard="{StaticResource ExpandDetailsAdd}"/>
    </EventTrigger>
    <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="CloseButton">
      <BeginStoryboard Storyboard="{StaticResource CollapseDetailsAdd}"/>
    </EventTrigger>
    <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="CancelAddExistingButton">
      <BeginStoryboard Storyboard="{StaticResource CollapseAddExisting}" />
    </EventTrigger>
    <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="EditButton">
      <BeginStoryboard Storyboard="{StaticResource ExpandDetailsEdit}"/>
    </EventTrigger>
    <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="DoneEditButton">
      <BeginStoryboard x:Name="CollapseDetailsEdit_BeginStoryboard" Storyboard="{StaticResource CollapseDetailsEdit}"/>
    </EventTrigger>
    <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="EditRelationshipsButton">
      <BeginStoryboard x:Name="ExpandDetailsEditRelationship_BeginStoryboard1" Storyboard="{StaticResource ExpandDetailsEditRelationship}"/>
    </EventTrigger>
    <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="DoneEditRelationshipButton">
      <BeginStoryboard x:Name="CollapseDetailsEditRelationship_BeginStoryboard1" Storyboard="{StaticResource CollapseDetailsEditRelationship}"/>
    </EventTrigger>
    <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="IntermediateCloseButton">
      <BeginStoryboard x:Name="CollapseDetailsAddIntermediate_BeginStoryboard" Storyboard="{StaticResource CollapseDetailsAddIntermediate}"/>
    </EventTrigger>
    <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="NoPhotoBorder">
      <BeginStoryboard Storyboard="{StaticResource NoPhoto_MouseEnter}" x:Name="NoPhoto_MouseEnter_BeginStoryboard"/>
    </EventTrigger>
    <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="NoPhotoBorder">
      <BeginStoryboard Storyboard="{StaticResource NoPhoto_MouseLeave}" x:Name="NoPhoto_MouseLeave_BeginStoryboard"/>
    </EventTrigger>
  </UserControl.Triggers>

  <DockPanel>

    <!-- Details Header -->
    <Border DockPanel.Dock="Top" x:Name="DetailsHeaderBorder" Background="{DynamicResource BackgroundBrush}" BorderThickness="1,1,1,0" CornerRadius="10,10,0,0" BorderBrush="{DynamicResource BorderBrush}">
      <DockPanel x:Name="DetailsHeader">
        <!-- Star -->
        <Path StrokeThickness="1.500000" Stroke="#ffffffff" StrokeMiterLimit="1.000000" Fill="{DynamicResource PrimaryStarBrush}" Data="F1 M 9.816406,1.694336 L 12.351074,6.830078 L 18.018066,7.654297 L 13.918457,11.654297 L 14.886230,17.299805 L 9.816406,14.630859 L 4.746094,17.299805 L 5.713867,11.654297 L 1.611328,7.654297 L 7.281250,6.830078 L 9.816406,1.694336 Z" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Center" x:Name="Star"/>
        <Button x:Name="DeleteButton" Content="Dele_te" FontSize="10" Width="40" Height="15" Click="DeleteButton_Click" HorizontalAlignment="Right" Margin="0,0,10,0" DockPanel.Dock="Right" Visibility="{Binding Path=IsDeletable, Converter={StaticResource BoolToVisibilityConverter}, Mode=Default}" Style="{DynamicResource RedButtonStyle}" />
        <TextBlock x:Name="NameHeader" Text="{Binding Path=FullName, Mode=Default, FallbackValue=Current Person}" Style="{DynamicResource HeaderStyle}" FontWeight="Bold" Height="23.94" Margin="5,10,10,10" DockPanel.Dock="Left" TextTrimming="CharacterEllipsis" Foreground="{DynamicResource HeaderFontColor}"/>
      </DockPanel>
    </Border>

    <Border DockPanel.Dock="Top" Background="{DynamicResource PanelGradientBrush}" Style="{DynamicResource BorderStyle}" x:Name="DetailsBodyBorder" BorderThickness="1,0,1,1" CornerRadius="0,0,10,10">
      <DockPanel>
        <!-- Details Info displays the information about the person such as the person's photo, name, and birth date. -->
        <Border x:Name="DetailsInfo" DockPanel.Dock="Top" Style="{DynamicResource DetailsBorderStyle}" Margin="0,0,0,0" BorderThickness="0,1,0,0" CornerRadius="0,0,0,0" Padding="0,0,0,0" Height="300" Opacity="1" Background="{x:Null}">
          <StackPanel Background="{x:Null}" Margin="0,0,0,0">
            <Border BorderBrush="{DynamicResource BorderBrush}">
              <Grid Margin="15,10,15,5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto" MinWidth="90" MaxWidth="100"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid AllowDrop="True" Background="{x:Null}" Drop="AvatarPhoto_Drop" >
                  <Border BorderBrush="#02747474" Background="#02000000" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" BorderThickness="1,1,1,1" x:Name="AvatarPhotoBorder">
                    <Border.BitmapEffect>
                      <DropShadowBitmapEffect ShadowDepth="7" Softness="0.75"/>
                    </Border.BitmapEffect>
                    <Image x:Name="Avatar" Source="{Binding Path=Avatar, Converter={StaticResource ImageConverter}, Mode=OneWay}" Stretch="Uniform" VerticalAlignment="Top" MaxWidth="125" MaxHeight="100" HorizontalAlignment="Left" StretchDirection="DownOnly"/>
                  </Border>
                  <Border x:Name="NoPhotoBorder" Visibility="{Binding Path=HasAvatar, Converter={StaticResource ComposingConverter}, Mode=Default}"  BorderBrush="#FFFFFFFF" Background="#02FFFFFF" Margin="0,5,5,5">
                    <Grid>
                      <Rectangle Fill="{DynamicResource NoPhotoBrush}" Stroke="{x:Null}" x:Name="NoPhotoRectangle">
                        <Rectangle.BitmapEffect>
                          <DropShadowBitmapEffect ShadowDepth="7" Softness="0.75"/>
                        </Rectangle.BitmapEffect>
                      </Rectangle>
                      <TextBlock Visibility="Hidden" HorizontalAlignment="Center" MaxWidth="80" x:Name="DragPhotoTextBlock" VerticalAlignment="Center" FontFamily="Calibri" FontSize="14" FontWeight="Bold" Text="Drag a photo here" TextAlignment="Center" TextWrapping="Wrap" Foreground="{DynamicResource InputFontColor}"/>
                    </Grid>
                  </Border>
                </Grid>
                <StackPanel Margin="10,0,0,0" Grid.Column="1" HorizontalAlignment="Left">
                  <Label x:Name="FullNameLabel" Content="Full Name" Target="{Binding ElementName=FirstNameTextBox, Mode=OneWay}" Padding="5,5,5,0" DockPanel.Dock="Top" Margin="0,0,0,4"/>
                  <TextBlock Text="{Binding Path=FullName, Mode=OneWay, FallbackValue=Full name}" Foreground="{DynamicResource FontColor}" x:Name="FullNameTextBlock" FontWeight="Bold" TextTrimming="CharacterEllipsis" HorizontalAlignment="Left" Margin="5,0,0,4" DockPanel.Dock="Top" FontSize="14" />
                  <Label Content="Born" Target="{Binding ElementName=BirthDateTextBox, Mode=OneWay}" Padding="5,8,5,0"  DockPanel.Dock="Top"  Margin="0,0,0,4"  />
                  <TextBlock Text="{Binding Path=BirthDate, Converter={StaticResource DateFormattingConverter}, Mode=OneWay, FallbackValue=Date of Birth}" x:Name="BirthDateTextBlock"  Foreground="{DynamicResource FontColor}" FontWeight="Bold"  HorizontalAlignment="Left" Margin="5,0,0,4" DockPanel.Dock="Top" TextTrimming="CharacterEllipsis"  FontSize="14"  />
                  <TextBlock Text="{Binding Path=BirthPlace, Mode=OneWay, FallbackValue=Place of Birth}" x:Name="BirthPlaceTextBlock"  Foreground="{DynamicResource FontColor}" FontWeight="Bold"  HorizontalAlignment="Left" Margin="5,0,0,4" DockPanel.Dock="Top" TextTrimming="CharacterEllipsis"  FontSize="14"  />
                </StackPanel>
              </Grid>
            </Border>

            <Label Margin="15,0,0,0" Content="Edit Person" HorizontalAlignment="Left" Width="95" Height="22.87" BorderThickness="0,0,0,2" Padding="3,2,5,0" Template="{DynamicResource LabelControlTemplate}"/>

            <Button Margin="15,0,10,0" x:Name="EditButton" Content="_Details" FontSize="10" Width="95" HorizontalAlignment="Left" Style="{DynamicResource BlackButtonStyle}"/>
            <Button Margin="15,2,10,2" x:Name="EditRelationshipsButton" Content="_Relationships" HorizontalAlignment="Left" Width="95" Style="{DynamicResource BlackButtonStyle}" FontSize="10"/>
            <Button Margin="15,2,10,2" x:Name="InfoButton" Content="_Photos &amp; Stories" HorizontalAlignment="Left" Width="95" Style="{DynamicResource BlackButtonStyle}" FontSize="10" Click="InfoButton_Click"/>

            <Border BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
              <Grid x:Name="AddFamilyGrid" Margin="10,5,10,10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <TextBlock Text="Create Relationship" Style="{DynamicResource SectionHeaderStyle}" Margin="5,5,0,8"/>
                <ComboBox IsSynchronizedWithCurrentItem="False" ItemsSource="{Binding Source={StaticResource RelationshipValuesEnumDS}}" x:Name="FamilyMemberComboBox"  Width="120" Grid.Row="1" HorizontalAlignment="Left" Margin="5,0,0,0" SelectionChanged="FamilyMemberComboBox_SelectionChanged" ItemTemplate="{DynamicResource FamilyMemberDataTemplate}" Style="{DynamicResource FamilyMemberComboBox}"/>
                <Button x:Name="FamilyMemberAddButton" Content="_Add Father" Grid.Row="1" Click="FamilyMemberAddButton_Click" Margin="5,0,0,0" HorizontalAlignment="Left" Width="105" Height="21" FontSize="10" VerticalAlignment="Stretch" />
              </Grid>
            </Border>
            <Path Fill="#FFFFFFFF" Stretch="Fill" Stroke="#FF000000" Width="1" Height="1" Data="M64.5,146.06"/>
          </StackPanel>
        </Border>

        <!-- Details Edit is used for modifying the person info -->
        <Border x:Name="DetailsEdit" DockPanel.Dock="Top" Style="{DynamicResource DetailsBorderStyle}" AllowDrop="True" Drop="AvatarPhoto_Drop" Margin="0,0,0,0" Background="{DynamicResource InputBackgroundBrush}" BorderThickness="0,1,0,1" CornerRadius="0,0,0,0" Padding="0,0,0,0" Height="545" Visibility="Visible">
          <StackPanel Margin="10,5,10,0" HorizontalAlignment="Stretch">
            <TextBlock Text="Details" TextWrapping="Wrap" Style="{DynamicResource SectionHeaderStyle}" Margin="5,0,0,10" Width="198.067" Height="15.96" HorizontalAlignment="Left" Foreground="{DynamicResource InputFontColor}"/>
            <StackPanel Orientation="Horizontal">
              <Border BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,1,1,1" Margin="5,0,0,0">
                <Grid>
                  <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Drag a photo here" Width="80" TextAlignment="Center" TextWrapping="WrapWithOverflow" Style="{DynamicResource AvatarTextBlockStyle}" Foreground="{DynamicResource InputFontColor}"/>
                  <Image x:Name="AvatarPhoto" AllowDrop="True" Height="75" Width="80" Source="{Binding Path=Avatar, Converter={StaticResource ImageConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                </Grid>
              </Border>
              <StackPanel Margin="15,0,0,0">
                <Label Content="Gender" Target="{Binding ElementName=GenderListBox, Mode=OneWay}" Padding="5,0,5,2" Foreground="{DynamicResource InputFontColor}"/>
                <ListBox KeyboardNavigation.DirectionalNavigation="Cycle" BorderBrush="Transparent" SelectedItem="{Binding Path=Gender, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" x:Name="GenderListBox" Foreground="{DynamicResource InputFontColor}" Background="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,-5,0,0" >
                  <ListBox.Resources>
                    <Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}" >
                      <Setter Property="Margin" Value="2, 2, 2, 0" />
                      <Setter Property="Template">
                        <Setter.Value>
                          <ControlTemplate>
                            <Border Background="Transparent">
                              <RadioButton IsHitTestVisible="False" Focusable="False" Foreground="{Binding Path=Foreground, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                                           Content="{TemplateBinding ContentPresenter.Content}"
                                           IsChecked="{Binding Path=IsSelected, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                            </Border>
                          </ControlTemplate>
                        </Setter.Value>
                      </Setter>
                    </Style>
                  </ListBox.Resources>
                  <ListBox.ItemsSource>
                    <Binding Mode="OneWay" Source="{StaticResource GenderEnumDS}"/>
                  </ListBox.ItemsSource>
                </ListBox>
              </StackPanel>
            </StackPanel>
            <Label Content="_First Name" Target="{Binding ElementName=FirstNameEditTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
            <TextBox TextWrapping="Wrap" x:Name="FirstNameEditTextBox" HorizontalAlignment="Left" Width="135" Margin="5,0,0,0" Text="{Binding Path=FirstName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
            <Label Content="_Middle Name" Target="{Binding ElementName=MiddleNameEditTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
            <TextBox TextWrapping="Wrap" x:Name="MiddleNameEditTextBox" Width="135" HorizontalAlignment="Left" Margin="5,0,0,0" Text="{Binding Path=MiddleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
            <Label Content="_Last Name" Target="{Binding ElementName=LastNameEditTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
            <TextBox TextWrapping="Wrap" x:Name="LastNameEditTextBox" Width="135" HorizontalAlignment="Left" Margin="5,0,0,0" Text="{Binding Path=LastName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
            <Label Content="_Suffix" Target="{Binding ElementName=SuffixEditTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
            <TextBox TextWrapping="Wrap" x:Name="SuffixEditTextBox" Width="135" Text="{Binding Path=Suffix, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Margin="5,0,0,0"/>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Label Content="Date of _Birth" Target="{Binding ElementName=BirthDateEditTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
              <TextBox TextWrapping="Wrap" x:Name="BirthDateEditTextBox" Width="135" VerticalAlignment="Top" Grid.Row="1" Margin="5,0,0,0" Text="{Binding Path=BirthDate, Converter={StaticResource DateFormattingConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"/>
              <CheckBox Margin="10,0,0,0" x:Name="IsLivingEditCheckBox" VerticalAlignment="Center" Content="Li_ving" Foreground="{DynamicResource InputFontColor}" Grid.Column="1" Grid.Row="1" IsChecked="{Binding Path=IsLiving, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, FallbackValue=True}"/>
            </Grid>
            <Label Content="_Place of Birth" Target="{Binding ElementName=BirthPlaceEditTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
            <TextBox TextWrapping="Wrap" x:Name="BirthPlaceEditTextBox" Text="{Binding Path=BirthPlace, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="135" HorizontalAlignment="Left" Margin="5,0,0,0"/>
            <Label Content="Date of Dea_th" Target="{Binding ElementName=DeathDateEditTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
            <TextBox TextWrapping="Wrap" x:Name="DeathDateEditTextBox" Width="135" HorizontalAlignment="Left" Margin="5,0,0,0" IsEnabled="{Binding Path=IsLiving, Converter={StaticResource NotConverter}, Mode=Default}" Text="{Binding Path=DeathDate, Converter={StaticResource DateFormattingConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"/>
            <Label Content="Place of Deat_h" Target="{Binding ElementName=DeathPlaceEditTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
            <TextBox TextWrapping="Wrap" x:Name="DeathPlaceEditTextBox" Text="{Binding Path=DeathPlace, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="135" HorizontalAlignment="Left" Margin="5,0,0,0" IsEnabled="{Binding Path=IsLiving, Converter={StaticResource NotConverter}, Mode=Default}"/>
            <Border Margin="0,10,0,0" BorderBrush="#FF6573A0" BorderThickness="0,2,0,0" Height="42">
              <StackPanel Margin="5,10,0,10" Orientation="Horizontal">
                <Button Content="_Done" x:Name="DoneEditButton" VerticalAlignment="Bottom" Height="20" IsDefault="True" HorizontalAlignment="Left" Width="60" Click="DoneEditButton_Click" IsCancel="True"/>
              </StackPanel>
            </Border>
          </StackPanel>
        </Border>

        <!-- Details Edit Relationsip is used for modifying the person's relationship with the parents and the spouse(s). -->
        <Border x:Name="DetailsEditRelationship" DockPanel.Dock="Top" Style="{DynamicResource DetailsBorderStyle}" Margin="0,0,0,0" Background="{DynamicResource InputBackgroundBrush}" BorderThickness="0,1,0,1" CornerRadius="0,0,0,0" Padding="0,0,0,0" Height="300" Visibility="Visible">
          <DockPanel Margin="10,5,10,0" HorizontalAlignment="Stretch">
            <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" HorizontalAlignment="Left">
              <TextBlock Text="Edit Relationships for" TextWrapping="NoWrap" Style="{DynamicResource SectionHeaderStyle}" Margin="5,0,0,10" HorizontalAlignment="Left" x:Name="EditRelationshipsTextBlock" Foreground="{DynamicResource InputFontColor}"/>
              <TextBlock Text="{Binding Path=FirstName}" TextWrapping="NoWrap" Style="{DynamicResource SectionHeaderStyle}" Margin="5,0,0,10" HorizontalAlignment="Left" Foreground="{DynamicResource InputFontColor}"/>
            </StackPanel>
            <TextBlock DockPanel.Dock="Top" Text="Parents" TextWrapping="Wrap" Style="{DynamicResource SectionHeaderStyle}" Margin="5,0,0,0" HorizontalAlignment="Left" Foreground="{DynamicResource InputFontColor}"/>
            <Grid DockPanel.Dock="Top" HorizontalAlignment="Left" Margin="5,0,5,0">
              <ListBox x:Name="ParentsEditListBox" KeyboardNavigation.DirectionalNavigation="Cycle" BorderBrush="Transparent" Foreground="{DynamicResource InputFontColor}" Background="{x:Null}"  MinHeight="20" MinWidth="100" SelectionChanged="ParentsEditListBox_SelectionChanged" Margin="5,0,5,0" HorizontalAlignment="Left" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
                <ListBox.Resources>
                  <Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}" >
                    <Setter Property="Margin" Value="2, 2, 2, 0" />
                    <Setter Property="Template">
                      <Setter.Value>
                        <ControlTemplate>
                          <Border Background="Transparent">
                            <RadioButton IsHitTestVisible="False" Focusable="False" Foreground="{Binding Path=Foreground, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                               Content="{Binding Path=Name}"
                               IsChecked="{Binding Path=IsSelected, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                          </Border>
                        </ControlTemplate>
                      </Setter.Value>
                    </Setter>
                  </Style>
                </ListBox.Resources>
                <ListBox.Visibility>
                  <Binding Path="HasParents" Converter="{StaticResource BoolToVisibilityConverter}" Mode="Default"/>
                </ListBox.Visibility>
              </ListBox>
            </Grid>

            <TextBlock DockPanel.Dock="Top" Text="Spouse/Partner" TextWrapping="Wrap" Style="{DynamicResource SectionHeaderStyle}" Width="198.067" Height="15.96" Margin="5,15,0,0" HorizontalAlignment="Left" Foreground="{DynamicResource InputFontColor}"/>
            <TextBlock x:Name="NoSpousesTextBlock" DockPanel.Dock="Top" Text="None" Margin="10,0,0,0" Foreground="{DynamicResource InputFontColor}" Visibility="{Binding Path=HasSpouse, Converter={StaticResource ComposingConverter}, Mode=Default}"/>
            <StackPanel DockPanel.Dock="Top" x:Name="SpousesInfo" Visibility="{Binding Path=HasSpouse, Converter={StaticResource BoolToVisibilityConverter}, Mode=Default}">
              <ComboBox x:Name="SpousesCombobox" IsSynchronizedWithCurrentItem="True" ItemTemplate="{DynamicResource ParentSetTemplate}" ItemsSource="{Binding Path=Spouses, Mode=OneWay}" SelectionChanged="SpousesCombobox_SelectionChanged" HorizontalAlignment="Left" Margin="10,5,0,0" Width="120"/>
              <ListBox x:Name="SpouseStatusListbox" KeyboardNavigation.DirectionalNavigation="Cycle" BorderBrush="Transparent" Foreground="{DynamicResource InputFontColor}" Background="{x:Null}" Padding="10,10,0,0" SelectionChanged="SpouseStatusListbox_SelectionChanged" Margin="0,-10,0,0">
                <ListBox.Resources>
                  <Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}" >
                    <Setter Property="Margin" Value="2, 2, 2, 0" />
                    <Setter Property="Template">
                      <Setter.Value>
                        <ControlTemplate>
                          <Border Background="Transparent">
                            <RadioButton IsHitTestVisible="False" Focusable="False" Foreground="{Binding Path=Foreground, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                              Content="{TemplateBinding ContentPresenter.Content}"
                              IsChecked="{Binding Path=IsSelected, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                          </Border>
                        </ControlTemplate>
                      </Setter.Value>
                    </Setter>
                  </Style>
                </ListBox.Resources>
                <ListBox.ItemsSource>
                  <Binding Mode="OneWay" Source="{StaticResource SpouseStatusEnumDS}"/>
                </ListBox.ItemsSource>
              </ListBox>

              <Grid HorizontalAlignment="Left" Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="40"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>

                <Label Content="_From" Height="25.96" HorizontalAlignment="Left" Target="{Binding ElementName=WeddingDateEditTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
                <TextBox Grid.Column="1" TextWrapping="Wrap" x:Name="FromEditTextBox" Width="135" HorizontalAlignment="Left" LostFocus="FromEditTextBox_LostFocus"/>

                <Label Grid.Row="1" Content="_To" Height="25.96" HorizontalAlignment="Left" Target="{Binding ElementName=DivorceDateEditTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
                <TextBox Grid.Row="1" Grid.Column="1" TextWrapping="Wrap" x:Name="ToEditTextBox" Width="135" HorizontalAlignment="Left" LostFocus="ToEditTextBox_LostFocus"/>
              </Grid>

            </StackPanel>

            <Border Margin="0,10,0,0" BorderBrush="#FF6573A0" BorderThickness="0,2,0,0" DockPanel.Dock="Bottom" VerticalAlignment="Bottom" Height="42">
              <StackPanel Margin="5,10,0,10" Orientation="Horizontal">
                <Button Content="_Done" VerticalAlignment="Bottom" Height="20" IsDefault="True" HorizontalAlignment="Left" Width="60" x:Name="DoneEditRelationshipButton" Click="DoneEditRelationshipButton_Click" IsCancel="True" />
              </StackPanel>
            </Border>
          </DockPanel>
        </Border>

        <!-- Details Add is used to add new people -->
        <Border x:Name="DetailsAdd" DockPanel.Dock="Top" Style="{DynamicResource DetailsBorderStyle}" Margin="0,0,0,0" BorderThickness="0,1,0,1" CornerRadius="0,0,0,0" Padding="0,0,0,0" Height="300" Background="{DynamicResource InputBackgroundBrush}" Visibility="Visible" >
          <StackPanel>
            <TextBlock Margin="15,5,5,5" Text="Add a Family Member" TextWrapping="Wrap" Style="{DynamicResource SectionHeaderStyle}" Foreground="{DynamicResource InputFontColor}"/>
            <StackPanel Orientation="Horizontal" Margin="15,0,10,0" HorizontalAlignment="Left" >
              <TextBlock Text="{Binding Path=FirstName, Converter={StaticResource FirstNamePossessiveFormConverter}, Mode=Default, FallbackValue=Firstname}" TextWrapping="Wrap" Style="{DynamicResource HeaderStyle}" HorizontalAlignment="Left" FontSize="18" FontWeight="Bold" Margin="0,0,0,0" Foreground="{DynamicResource InputFontColor}"/>
              <TextBlock Text="{Binding Path=SelectedValue, ElementName=FamilyMemberComboBox, Mode=Default, FallbackValue=Relationship}" TextWrapping="Wrap" Style="{DynamicResource HeaderStyle}" HorizontalAlignment="Left" FontSize="18" FontWeight="Bold" Margin="0,0,0,0" Foreground="{DynamicResource InputFontColor}"/>
            </StackPanel>
            <Border Margin="10,5,10,0" BorderThickness="0,2,0,0">
              <StackPanel Margin="0,0,0,0">
                <Label Content="_First Name" Target="{Binding ElementName=FirstNameInputTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}"/>
                <TextBox TextWrapping="Wrap" x:Name="FirstNameInputTextBox" HorizontalAlignment="Left" Width="135" Margin="5,0,0,0"/>
                <Label Content="_Last Name" Target="{Binding ElementName=LastNameInputTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
                <TextBox TextWrapping="Wrap" x:Name="LastNameInputTextBox" Width="135" HorizontalAlignment="Left" Margin="5,0,0,0"/>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Label Content="Date of _Birth" Target="{Binding ElementName=BirthDateInputTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
                  <TextBox TextWrapping="Wrap" x:Name="BirthDateInputTextBox" Width="135" VerticalAlignment="Top" Grid.Row="1" Margin="5,0,0,0" Text="{Binding Path=BirthDate, Converter={StaticResource DateFormattingConverter}, Source={StaticResource person}, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"/>                  
                  <CheckBox Margin="10,0,0,0" VerticalAlignment="Center" Content="Li_ving" Foreground="{DynamicResource InputFontColor}" Grid.Column="1" Grid.Row="1" x:Name="IsLivingInputCheckbox" IsChecked="True"/>
                </Grid>
                <Label Content="_Place of Birth" Target="{Binding ElementName=BirthPlaceInputTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
                <TextBox TextWrapping="Wrap" x:Name="BirthPlaceInputTextBox" Width="135" HorizontalAlignment="Left" Margin="5,0,0,0"/>
                <Border Margin="0,10,0,0" BorderBrush="#FF6573A0" BorderThickness="0,2,0,0" Height="42">
                  <StackPanel Margin="5,10,0,10" Orientation="Horizontal">
                    <Button Content="_Add" x:Name="AddButton" VerticalAlignment="Bottom" Height="20" IsDefault="True" HorizontalAlignment="Left" Width="60" Click="AddButton_Click"/>
                    <Button x:Name="CloseButton" Content="_Cancel" Height="20" IsCancel="True" Width="60" Margin="15,0,0,0" Click="CloseButton_Click" />
                  </StackPanel>
                </Border>
              </StackPanel>
            </Border>
          </StackPanel>
        </Border>

        <!-- AddExisting is used to a relationship to an existing person in the tree-->
        <Border x:Name="AddExisting" DockPanel.Dock="Top" Style="{DynamicResource DetailsBorderStyle}" Margin="0,0,0,0" BorderThickness="0,1,0,1" CornerRadius="0,0,0,0" Padding="0,0,0,0" Height="545" Background="{DynamicResource InputBackgroundBrush}" Visibility="Visible">

          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="Auto" />
              <RowDefinition Height="*" />
              <RowDefinition Height="Auto" />
              <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <DockPanel Grid.Row="2" x:Name="ConnectWithPanel">
              <StackPanel Margin="15,5,15,0" Orientation="Horizontal" DockPanel.Dock="Bottom">
            		<TextBlock Text="Connect" TextWrapping="Wrap" Style="{DynamicResource SectionHeaderStyle}" Foreground="{DynamicResource InputFontColor}" DockPanel.Dock="Top" FontWeight="Normal" VerticalAlignment="Center" Margin="0,0,3,0" FontSize="13" />
            		<TextBlock Text="{Binding Path=FirstName, Mode=Default, FallbackValue=Firstname}" TextWrapping="Wrap" FontSize="13" Foreground="{DynamicResource InputFontColor}" Margin="0,0,3,0"/>
            		<TextBlock Text="with" TextWrapping="Wrap" FontSize="13" Foreground="{DynamicResource InputFontColor}" Margin="0,0,3,0"/>
            		<TextBlock TextWrapping="Wrap" Foreground="{DynamicResource InputFontColor}" TextTrimming="CharacterEllipsis" Text="{Binding Path=SelectedValue, ElementName=ExistingPeopleListBox, Mode=Default}" ToolTip="a" VerticalAlignment="Center" FontSize="13"/>
            	</StackPanel>
              <DockPanel Margin="15,0,15,0" DockPanel.Dock="Top">
              	<TextBlock Text="Filter:" Foreground="{DynamicResource InputFontColor}" VerticalAlignment="Center"/>
              	<TextBlock Text=" (" TextWrapping="Wrap" Foreground="{DynamicResource InputFontColor}" VerticalAlignment="Center"/>
              	<TextBlock Text="{Binding Path=Items.Count, ElementName=ExistingPeopleListBox, Mode=Default}" TextWrapping="Wrap" Foreground="{DynamicResource InputFontColor}" VerticalAlignment="Center"/>
              	<TextBlock Text=") " TextWrapping="Wrap" Foreground="{DynamicResource InputFontColor}" VerticalAlignment="Center"/>
              	<local:FilterText x:Name="FilterTextBox1" TextBoxBase.TextChanged="FilterTextBox1_TextChanged"/>
              </DockPanel>
              <ListBox IsSynchronizedWithCurrentItem="True" Margin="15,5,15,0" x:Name="ExistingPeopleListBox" ItemTemplate="{DynamicResource ExistPersonTemplate}" SelectedValuePath="FullName" DockPanel.Dock="Top" Style="{DynamicResource ExistingPeopleListBoxStyle}" ItemContainerStyle="{DynamicResource ExistingPeopleListBoxItemStyle}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" />
            </DockPanel>

            <Separator Grid.Row="1" Style="{DynamicResource DetailsSeparatorStyle}" />

            <DockPanel Grid.Row="0" x:Name="ConnectAsPanel">
              <TextBlock Margin="15,5,5,5" Text="Connect a Family Member as" TextWrapping="Wrap" Style="{DynamicResource SectionHeaderStyle}" Foreground="{DynamicResource InputFontColor}" DockPanel.Dock="Top" FontWeight="Normal" />
              <StackPanel Orientation="Horizontal" Margin="15,0,10,0" HorizontalAlignment="Left" DockPanel.Dock="Bottom">
                <TextBlock Text="{Binding Path=FirstName, Converter={StaticResource FirstNamePossessiveFormConverter}, Mode=Default, FallbackValue=Firstname}" TextWrapping="NoWrap" Style="{DynamicResource HeaderStyle}" HorizontalAlignment="Left" FontSize="18" FontWeight="Bold" Margin="0,0,0,0" Foreground="{DynamicResource InputFontColor}" MaxWidth="145" TextTrimming="CharacterEllipsis" />
                <ComboBox x:Name="ExistingFamilyMemberComboBox" ItemsSource="{Binding Source={StaticResource RelationshipValuesEnumDS}}" Width="120" Grid.Row="1" HorizontalAlignment="Left" Margin="5,0,0,0" Style="{DynamicResource FamilyMemberComboBox}" ItemTemplate="{DynamicResource ExistingFamilyMemberDataTemplate}" />
              </StackPanel>
            </DockPanel>

            <Separator Grid.Row="3" Style="{DynamicResource DetailsSeparatorStyle}"/>

            <StackPanel Grid.Row="4" Margin="15,5,15,5" Orientation="Horizontal">
              <Button Content="_Add" x:Name="AddExistingButton" Height="20" IsDefault="True" Width="60" Click="AddExistingButton_Click" />
              <Button x:Name="CancelAddExistingButton" Content="_Cancel" Height="20" IsCancel="True" Width="60" Margin="15,0,0,0" Click="CloseButton_Click" />
            </StackPanel>

          </Grid>
        </Border>

        <!-- Details Add Intermediate is displayed when additional input is needed when adding a person.  Currently, the choice for parent sets are shown when needed. -->
        <Border x:Name="DetailsAddIntermediate" DockPanel.Dock="Top" Style="{DynamicResource DetailsBorderStyle}" Margin="0,0,0,0" BorderThickness="0,1,0,1" CornerRadius="0,0,0,0" Padding="0,0,0,0" Background="{DynamicResource InputBackgroundBrush}" Visibility="Visible" Height="200">
          <StackPanel>
            <TextBlock Margin="15,5,5,5" Text="Add a Family Member" TextWrapping="Wrap" Style="{DynamicResource SectionHeaderStyle}" Foreground="{DynamicResource InputFontColor}"/>
            <StackPanel Orientation="Horizontal" Margin="15,0,10,0" HorizontalAlignment="Left" >
              <TextBlock Text="{Binding Path=FirstName, Converter={StaticResource FirstNamePossessiveFormConverter}, Mode=Default, FallbackValue=Firstname}" TextWrapping="Wrap" Style="{DynamicResource HeaderStyle}" HorizontalAlignment="Left" FontSize="18" FontWeight="Bold" Margin="0,0,0,0" Foreground="{DynamicResource InputFontColor}"/>
              <TextBlock Text="{Binding Path=SelectedValue, ElementName=FamilyMemberComboBox, Mode=Default, FallbackValue=Relationship}" TextWrapping="Wrap" Style="{DynamicResource HeaderStyle}" HorizontalAlignment="Left" FontSize="18" FontWeight="Bold" Margin="0,0,0,0"/>
            </StackPanel>
            <Border Margin="10,5,10,0" BorderBrush="#FF6573A0" BorderThickness="0,2,0,0">
              <StackPanel Margin="0,0,0,0">
                <StackPanel Margin="15,0,0,0">
                  <Label Content="Who are the parents?" Target="{Binding ElementName=ParentsListBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}"/>
                  <ListBox KeyboardNavigation.DirectionalNavigation="Cycle" BorderBrush="Transparent" x:Name="ParentsListBox" Foreground="{DynamicResource InputFontColor}" Background="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,-5,0,0" SelectionChanged="ParentsListBox_SelectionChanged" >
                    <ListBox.Resources>
                      <Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}" >
                        <Setter Property="Margin" Value="2, 2, 2, 0" />
                        <Setter Property="Template">
                          <Setter.Value>
                            <ControlTemplate>
                              <Border Background="Transparent">
                                <RadioButton IsHitTestVisible="False" Focusable="False" Foreground="{Binding Path=Foreground, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                                             Content="{Binding Path=Name}"
                                             IsChecked="{Binding Path=IsSelected, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                              </Border>
                            </ControlTemplate>
                          </Setter.Value>
                        </Setter>
                      </Style>
                    </ListBox.Resources>
                  </ListBox>
                </StackPanel>
                <Border Margin="0,10,0,0" BorderBrush="#FF6573A0" BorderThickness="0,2,0,0" Height="42">
                  <StackPanel Margin="5,10,0,10" Orientation="Horizontal">
                    <Button Content="_Add" x:Name="IntermediateAddButton" VerticalAlignment="Bottom" Height="20" IsDefault="True" HorizontalAlignment="Left" Width="60" Click="IntermediateAddButton_Click"/>
                    <Button x:Name="IntermediateCloseButton" Content="_Cancel" Height="20" IsCancel="True" Width="60" Margin="15,0,0,0" Click="IntermediateCloseButton_Click" />
                  </StackPanel>
                </Border>
              </StackPanel>
            </Border>
          </StackPanel>
        </Border>

        <!-- Details List shows the current list of all people in the family -->
        <Border x:Name="DetailsList" DockPanel.Dock="Top" Style="{DynamicResource DetailsBorderStyle}" Background="{x:Null}" BorderThickness="0,1,0,0" CornerRadius="0,0,0,0" Opacity="1" Margin="0,0,0,0" Padding="15,10,5,10">
          <DockPanel>
            <DockPanel Margin="0,0,0,8" DockPanel.Dock="Top">
              <TextBlock Text="Family (" Style="{DynamicResource SectionHeaderStyle}" Width="42.1366666666667" Height="20" />
          		<TextBlock Text="{Binding Path=Items.Count, ElementName=FamilyListView}" FontWeight="Normal" Style="{DynamicResource SectionHeaderStyle}" Height="20" />
          		<TextBlock Text=")" Style="{DynamicResource SectionHeaderStyle}" Width="4.05" Height="20" />
          		<Button x:Name="FamilyDataButton" Content="Expand" Style="{DynamicResource BlackButtonStyle}" FontSize="10" Click="FamiliyDataButton_Click" HorizontalAlignment="Right"/>
          	</DockPanel>
            <DockPanel HorizontalAlignment="Stretch" DockPanel.Dock="Top">
              <Label Margin="0,0,5,0" Content="Filter" VerticalAlignment="Center"/>
              <local:FilterText x:Name="FilterTextBox" TextBoxBase.TextChanged="FilterTextBox_TextChanged" VerticalAlignment="Center" />
            </DockPanel>
            <local:FamilyDisplayListView x:Name="FamilyListView" Background="{x:Null}" Margin="0,10,0,0" BorderBrush="{x:Null}"
              SelectionMode="Single" SelectionChanged="FamilyListView_SelectionChanged" ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
              Style="{DynamicResource FamilyListViewStyle}" ScrollViewer.VerticalScrollBarVisibility="Auto"
              VirtualizingStackPanel.IsVirtualizing="True" ScrollViewer.CanContentScroll="True" >
              <local:FamilyDisplayListView.ItemContainerStyle>
                <Style TargetType="{x:Type ListViewItem}" >
                  <Setter Property="Template" Value="{DynamicResource FamilyListViewItemTemplate}"/>
                  <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                </Style>
              </local:FamilyDisplayListView.ItemContainerStyle>
              <local:FamilyDisplayListView.View>
                <GridView AllowsColumnReorder="False">
                  <local:SortListViewColumn SortProperty="Name"  Header="Name" DisplayMemberBinding="{Binding Path=FullName}" Width="115" HeaderContainerStyle="{DynamicResource NameGridViewColumnHeader}"/>
                  <local:SortListViewColumn SortProperty="YearOfBirth" Header="Born" Width="50">
                    <local:SortListViewColumn.CellTemplate>
                      <DataTemplate>
                        <TextBlock HorizontalAlignment="Left" Text="{Binding Path=YearOfBirth}" Foreground="{DynamicResource FontColor}" />
                      </DataTemplate>
                    </local:SortListViewColumn.CellTemplate>
                  </local:SortListViewColumn>
                  <local:SortListViewColumn SortProperty="YearOfDeath"  Header="Died" Width="50">
                    <local:SortListViewColumn.CellTemplate>
                      <DataTemplate>
                        <TextBlock HorizontalAlignment="Left" Text="{Binding Path=YearOfDeath}" Foreground="{DynamicResource FontColor}" />
                      </DataTemplate>
                    </local:SortListViewColumn.CellTemplate>
                  </local:SortListViewColumn>
                  <local:SortListViewColumn SortProperty="Age"  Header="Age" Width="40">
                    <local:SortListViewColumn.CellTemplate>
                      <DataTemplate>
                        <TextBlock HorizontalAlignment="Left" Text="{Binding Path=Age}" Foreground="{DynamicResource FontColor}" />
                      </DataTemplate>
                    </local:SortListViewColumn.CellTemplate>
                  </local:SortListViewColumn>
                </GridView>
              </local:FamilyDisplayListView.View>
            </local:FamilyDisplayListView>
          </DockPanel>
        </Border>
      </DockPanel>
    </Border>
  </DockPanel>
</UserControl>
